<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<?php
if (!isset($_COOKIE["Token"])){
    exit("请先登录！");
}
$Token=$_COOKIE["Token"]
?>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
    <!--事件名不乱来 可能导致事件绑定不上-->
    <input type="file" id="file" name="pic[]" multiple onchange="abc(event)">
    <input type="submit" value="提交">
</form>
<img id="imgBase"  width="200px" height="200px" >
<img id="img1"  width="100px" height="100px">
<img id="img2" width="50px" height="50px">
</body>

<script>
    function abc(event){
        // var files=document.getElementById('file').files;//获取input的上传文件数组 和下一行是一样的
        var files = event.target.files;
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        document.getElementById('imgBase').src=imgURL;
        document.getElementById('img1').src=imgURL;
        document.getElementById('img2').src=imgURL;
    }
</script>
</html>